/**
 * The class AddOp extends the class BinaryOp and represents the addition operation
 * @author Michael Fildstein, ID: 309161594     
 * @author Tomer Ben Rachel ID: 021982475     
 */


public class AddOp extends BinaryOp {
	
	private String sign = "+";
	private double ans;
	private double precedence = 1;
	
 /**
 * The method operate receives two double data type parameters and returns the result of their sum
 * @param left A double data type representing a number
 * @param right  A double data type representing a number
 * @return A double data type representing the addition between the two parameters
 */
  
   
	public double operate(double left, double right){
		this.ans = left + right;
		return ans;
		
	}
	
   
   
/**
 * The method toString returns a string representing the addition sign
 * @return a string data type representing the addition sign
 */
 
	public String toString(){
		return sign;
	}
	
	public double getPrecedence() {
		return precedence;
	}
	

}
